package day;

/**
 * 371. 两整数之和
 */
public class P371 {
    public int getSum(int a, int b) {
        while (b != 0) {
            int tmp = a ^ b;
            b = a & b;
            b = b << 1;
            a = tmp;
        }
        return a;
    }

    public static void main(String[] args) {
        int sum = new P371().getSum(-3, 2);
        System.out.println(sum);
    }
}
